package com.example.outofschool;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.fragment.NavHostFragment;
import androidx.navigation.ui.NavigationUI;

import java.util.Objects;

import cn.jiguang.analytics.android.api.JAnalyticsInterface;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        /* 隐藏actionbar */
        Objects.requireNonNull(getSupportActionBar()).hide();
        /* 开启debug模式 */
        JAnalyticsInterface.setDebugMode(true);
        /* 初始化极光统计接口 */
        JAnalyticsInterface.init(this);

        NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView);
        NavController navController = Objects.requireNonNull(navHostFragment).getNavController();
        NavigationUI.setupActionBarWithNavController(this, navController);
    }

}